<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      const arr = [
        {
          id: 1,
          firstName: "li",
          lastName: "jack",
          age: 20,
        },
        {
          id: 2,
          firstName: "li",
          lastName: "lucy",
          age: 21,
        },
        {
          id: 3,
          firstName: "sun",
          lastName: "rose",
          age: 22,
        },
        {
          id: 4,
          firstName: "zhang",
          lastName: "tom",
          age: 20,
        },
        {
          id: 5,
          firstName: "wang",
          lastName: "lili",
          age: 19,
        },
      ];
      const r = arr.map(function (v) {
        return {
          id: v.id,
          age: v.age + "岁",
          fullName: v.lastName + " " + v.firstName,
        };
      });
      console.log("输出", r);
    </script>
  </body>
</html>
